<template>
	<div class="home-nav">
		<ul>
			<li v-for="item in navList" :key="item.id">
				<router-link :to="item.href">{{item.name}}</router-link>
				<ul v-if="item.childNav">
					<li v-for="childItem in item.childNav" :key="childItem.id">
						<router-link :to="childItem.href">{{childItem.name}}</router-link>
					</li>
				</ul>
			</li>
		</ul>
	</div>
</template>

<script>
export default {
  name: "HomeNav",
  data() {
    return {
      ulShow: false,
      navList: [
        {
          id: "1",
          href: "/",
          name: "首页"
        },
        {
          id: "2",
          href: "/about",
          name: "关于我们",
          childNav: [
            {
              id: "001",
              href: "/",
              name: "关于企业"
            },
            {
              id: "002",
              href: "/",
              name: "机构简介"
            },
            {
              id: "003",
              href: "/",
              name: "企业文化"
            },
            {
              id: "004",
              href: "/team",
              name: "团队风采"
            }
          ]
        },
        {
          id: "3",
          href: "/register",
          name: "工商注册"
        },
        {
          id: "4",
          href: "/",
          name: "VIP服务"
        },
        {
          id: "5",
          href: "/",
          name: "资质服务"
        },
        {
          id: "6",
          href: "/news",
          name: "新闻中心"
        },
        {
          id: "7",
          href: "/contact",
          name: "联系我们"
        }
      ]
    };
  }
};
</script>

<style lang="stylus" scoped>
.home-nav
	width 4.65rem
	height 100%
	background-color #ececec
	position absolute
	top 0
	right -4.65rem
	text-align right
	ul
		li
			border-top 1px solid #fff
			line-height .95rem
			a
				color #818181
				font-size .22rem
				text-decoration none
				padding-right .13rem
			ul
				background-color #fff
				margin-right 0
				height 2.36rem
				li
					height .58rem
					line-height .58rem
					a
						color #818181
						font-size .22rem
						display block
</style>
